import request from '@/utils/request'

// 查询日常记录-血压记录列表
export function listBloodPressure(query) {
  return request({
    url: '/every/bloodPressure/list',
    method: 'get',
    params: query
  })
}

// 查询日常记录-血压记录详细
export function getBloodPressure(id) {
  return request({
    url: '/every/bloodPressure/' + id,
    method: 'get'
  })
}

// 新增日常记录-血压记录
export function addBloodPressure(data) {
  return request({
    url: '/every/bloodPressure',
    method: 'post',
    data: data
  })
}

// 修改日常记录-血压记录
export function updateBloodPressure(data) {
  return request({
    url: '/every/bloodPressure',
    method: 'put',
    data: data
  })
}

// 删除日常记录-血压记录
export function delBloodPressure(id) {
  return request({
    url: '/every/bloodPressure/' + id,
    method: 'delete'
  })
}

// 查询app日常记录-血压记录列表（按时间）
export function appListByTimeBP(query) {
  return request({
    url: '/every/bloodPressure/app/list',
    method: 'get',
    params: query
  })
}

// 查询对比趋势
export function queryTrendListBP(query) {
  return request({
    url: '/every/bloodPressure/app/trend/list',
    method: 'get',
    params: query
  })
}

// 正常异常数量统计
export function statisticsExceBP(query) {
  return request({
    url: '/every/bloodPressure/app/statisticsExce',
    method: 'get',
    params: query
  })
}

// 查询测量类型
export function queryBloodPressureTypeList(query) {
  return request({
    url: '/every/bloodPressure/targetId',
    method: 'get',
    params: query
  })
}

// 计算当前测量数据，与上一次和10天前的数据对比
export function queryDateCompareBP(id) {
  return request({
    url: '/every/bloodPressure/dateCompare/' + id,
    method: 'get'
  })
}


